package com.arpa.wms.mapper;

import com.arpa.wms.domain.dto.PointsExchangeGoodsDTO;
import com.arpa.wms.domain.entity.PointsExchangeGoods;
import com.arpa.wms.domain.vo.PointsExchangeGoodsVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 * 积分兑换商品
 * </p>
 *
 * @author wangdong
 * @since 2021-07-03
 */
public interface PointsExchangeGoodsMapper extends BaseMapper<PointsExchangeGoods> {

    /**
     * 查询列表
     * @param pointsExchangeGoodsDTO
     * @return
     */

    List<PointsExchangeGoodsVO> queryList(PointsExchangeGoodsDTO pointsExchangeGoodsDTO);


    /**
     * 查询合计,包含总数
     *
     * @param pointsExchangeGoodsDTO
     * @return
     */
    PointsExchangeGoodsVO queryListSum(PointsExchangeGoodsDTO pointsExchangeGoodsDTO);


    /**
     * 校验名称和积分
     *
     * @param pointsExchangeGoodsDTO
     * @return
     */
    PointsExchangeGoodsVO checkNameOrPoints(PointsExchangeGoodsDTO pointsExchangeGoodsDTO);


    /**
     * 删除兑换商品
     * @param code
     */
    void deleteByCode(String code);


    /**
     * 获取当前机构启用的兑换商品
     * @param pointsExchangeGoodsDTO
     */
    List<PointsExchangeGoodsVO> queryEnableList(PointsExchangeGoodsDTO pointsExchangeGoodsDTO);

    /**
     * 更新状态
     * @param codes
     * @param status
     * @return
     */
    int changeStatus(String codes,String status,String groupCode);
}
